#{extends 'frame.html' /}

#{set title:'任务列表' /}



#{set 'moreStyles'}

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/task-list.css'}" />

<link rel="stylesheet" media="screen"

	href="@{'/public/stylesheets/jquery.pagination.css'}" />

#{/set}

<div class="contentCard">

    <div class="contentBody clearfix" id="condition">

        <div class="filterBlock">

            <span class="secondTile">请选择平台</span>

            <span style="font-size:smaller;color:#999;" class="bold">


	        </span>

            

            <div class="clearfix" id="platform">

                #{list items:Platforms, as:'p'}

                <a class="checkTextBtn ${p.toString()=='TAOBAO'?'selectedCtb':''} " href="javascript:;" value="${p}" id="${p}">${p.title}</a>

                #{/list}

            </div>

        </div>

    </div>    

    <div class="contentBody clearfix" id="condition">

        <div class="filterBlock">

            <span class="secondTile">请选择终端</span>

            <div class="clearfix" id="device">

                #{list items:Devices, as:'d'}

                #{if d.toString()=='PC'}

                <a class="checkTextBtn selectedCtb" href="javascript:;" value="${d}" id="${d}">${d.title}</a>

                #{/if}

                #{else}

                <a class="checkTextBtn" href="javascript:;" value="${d}" id="${d}">手机/pad</a>

                #{/else}

            #{/list}

            </div>

        </div>

        <div class="filterBlock">

            <span class="secondTile">请选择任务类型</span>

            <span style="font-size:smaller;color:#999;" class="bold">


	        </span>

	        

            <div class="clearfix" id="taskType">

                #{list items:TaskTypes, as:'tp'}

                <a class="checkTextBtn ${tp.toString()=='ORDER'?'selectedCtb':''} " href="javascript:;" value="${tp}" id="${tp}">${tp.title}</a>

                #{/list}

            </div>

        </div>

    </div>

#{if user?.type?.toString()=='BUYER'}

<input type="hidden" id="userType" value="BUYER" />

    <div class="contentBody clearfix" id="condition">

        <div class="filterBlock">

            <span class="secondTile">请选择买号</span>

            <span style="font-size:smaller;color:#999;" class="bold">


	        </span>

            <div id="buyerAccountPlatform" class="clearfix "></div>

        </div>

    </div>

 #{/if}

 #{else}

 <input type="hidden" id="userType" value="" />

 #{/else}

</div>



<div class="tabbedCard" id="pnlPC">

    <div class="contentTitle taskTypeSwitcher">

        <span class="iconfont">&#xf0099;</span>

        <span class="mr-10">PC任务列表</span>

        #{if user?.isBuyer()}

        <span style="font-size:smaller;color:#999;" class="bold">

            “平台返款”标记的任务订单直接返到买手本金账户，“极速返款”标记的任务由商家返到买手财付通账号。

            <a href="/notice/11" class="blue" target="_black">>查看详情</a>

        </span>

        #{/if}

    </div>

    <div class="tabSwitchWrapper">

        <a class="tab-cell taskTypeTab focus allTask" href="javascript:;" value="">全部</a>

        <a class="tab-cell taskTypeTab" href="javascript:;" value="EXTRA_REWARD">加赏</a>

        <a class="tab-cell taskTypeTab" href="javascript:;" value="SYS_RECOMMEND">推荐</a>

        <a class="tab-cell taskTypeTab" href="javascript:;" value="NEW_SHOP">新商家</a>

        <a class="tab-cell taskTypeTab" href="javascript:;" value="COMMON">常规</a>

    </div>

    <div class="contentBody">

        <div class="taskSection" id="taskListShower">

            <div class="taskTableTitle">

                <table class="normTable">

                    <tbody>

                        <tr>

                            <td class="r_seller">卖家</td>

                            <td class="r_percount">购买件数</td>

                            <td class="r_price">垫付资金</td>

                            <td class="r_commision">佣金</td>

                            <td class="r_type">任务类型</td>

                            #{if role=='admin'}

                            	<td class="r_amount">任务总数</td>

                            #{/if}

                            <td class="r_percent">领取进度</td>

                            #{if user?.type?.toString()=='BUYER'}

                            <td class="r_op">操作</td>

                            #{/if}

                        </tr>

                    </tbody>

                </table>

            </div>

           

		</div>

		<div class="popWrapper" style="display: none;" id="tr_loading_mask">

			<div class="maskLayer"></div>

			<img class="tr_juhua" src="@{'/public/images/pre_loading.gif'}" />

		</div>

            <div class="taskWrapper"></div>

        </div>

</div>



<div class="tabbedCard" id="pnlWireless" style="display:none;">

    <div class="contentTitle taskTypeSwitcher">

        <span class="iconfont">&#xf00a2;</span>

        <span >无线任务列表</span>

        #{if user?.isBuyer()}

        <span style="font-size:smaller;color:#999;" class="bold">
			最新手机端任务教程，买手必看。点击 <a href='http://www.weizhuan.la/admin/notice/17'>查看详情</a>

        </span>

        #{/if}

    </div>

    <div class="tabSwitchWrapper">

        <span>

            <a class="tab-cell grey taskListType task-family-on allTask" value="">全部</a>

            <a class="tab-cell grey taskListType" value="EXTRA_REWARD">加赏</a>

            <a class="tab-cell grey taskListType" value="SYS_RECOMMEND">推荐</a>

            <a class="tab-cell grey taskListType" value="NEW_SHOP">新商家</a>

            <a class="tab-cell grey taskListType" value="COMMON">常规</a>

        </span>

    </div>

    <div class="contentBody">

        <div class="taskSection">

            <div class="taskTableTitle">

                <table class="normTable">

                    <tbody>

                        <tr>

                            <td class="r_seller">卖家</td>

                            <td class="r_percount">购买件数</td>

                            <td class="r_price">垫付资金</td>

                            <td class="r_commision">佣金</td>

                            <td class="r_type">任务类型</td>

                            #{if role=='admin'}

                            	<td class="r_amount">任务总数</td>

                            #{/if}

                            <td class="r_percent">领取进度</td>

                            #{if user?.type?.toString()=='BUYER'}

                            <td class="r_op">操作</td>

                            #{/if}

                        </tr>

                    </tbody>

                </table>

            </div>

            <div class="taskWrapper"></div>

        </div>

        <div class="taskSection"></div>

        <div class="taskSection"></div>

    </div>

</div>



<div class="contentCard noboder">

	<div class="pagin-btm clearFix"style="display: none;">

		<div class="pagination"></div>

    </div>

</div>	

#{if user?.type?.toString()=='BUYER'}

<!--领取任务确认窗口-->

<div class="popWrapper" id="takePickerWnd" data-id="0">

    <div class="maskLayer"></div>

    <div class="modalWnd">

        <a href="javascript:;" class="wnd_Close_Icon" title="关闭窗口"></a>

        <h3 class="topTile">即将接手的任务</h3>

        <div class="modalWndInner">

        	<div class="blue">接手任务会冻结1金币,任务完成或主动撤销任务，金币会自动返还，任务超时会扣取1金币，请注意不要超时</div>

            <label>使用买号</label>

            <div id="buyerAccountPicker" class="clearfix"></div>

            <div id="taskInfoShower">

                <div class="infoBlock">

                    <label>任务类型</label>

                    <div class="spOrderType">订单</div>

                </div>

                <div class="infoBlock">

                    <label>商家</label>

                    <div class="spSeller"></div>

                </div>

                <div class="infoBlock">

                    <label>垫付资金</label>

                    <div class="spAmount"></div>

                </div>

                <div class="infoBlock">

                    <label>佣金</label>

                    <div class="spCommission"></div>

                </div>

                <div class="infoBlock">

                    <label>经验</label>

                    <div class="spExpr">0</div>

                </div>

                <div class="wndBotButtonSection">

		            <a id="btnConfirmTake" href="javascript:;" class="botButton">确认领取该任务</a>

		             <a id="btnCancleTake" href="javascript:;" class="botButton mr20">不领取任务</a>

		        </div>

                <br/>

                <div class="infoBlock">

                	<label>商家特殊要求</label>

                	<div class="spTaskRequest"></div>

                </div>

            </div>

        </div>

        

    </div>

</div>



<div class="popWrapper" id="takeRequiredWnd" data-id="0">

   <div class="maskLayer"></div>

    <div class="modalWnd">

        <h3 class="topTile">下单规则</h3>

        <div class="modalWndInner">

	        <div class='blue'><h3>做任务前必读！（<font color="red">非常重要</font>）</h3></div>

	        <div>1、严格遵守任务要求和任务流程。 </div>

	        <div>2、看清商家要求，如要求留言，必须留言！</div>

	        <div>3、严禁使用淘宝客、返利网、花呗、淘金币、信用卡等方式下单。</div>

	        <div>4、有问题可联系客服。</div>

	        <div><span class="red"><h3>以上情况非常严重，不遵守的将有可能被封号，请赚客朋友们务必遵守！</h3></span></div>

	        <div class="wndBotButtonSection">

			      <a id="btnSureTake" href="javascript:;" data-id="" class="botButton mr20 btnSureTake">我知道了</a>

			</div>

	        <br/>   

       </div>

 </div>

</div>

#{/if}

<!-- templates -->

<textarea id="taskRowTempl" class="muban">

    {{#results}}

    <div class="taskRow">

        <table class="normTable">

            <tbody>

                <tr>

                    <td class="r_seller">

                        {{sellerNick}}

                    </td>

                    <td class="r_percount">{{itemBuyNum}}件</td>

                    <td class="r_price">

                        <span class="iconfont prePayment" pre="{{prePayment}}">&#xf0150;</span>

                        {{prePayment}}元

                    </td>

                    <td class="r_commision">

                        <span class="green rewardIngotSum prc" rew="{{baseOrderIngotSum}}">{{baseOrderIngotFormat}}</span> 

                        {{#extraRewardIngot}}

                        <span class="red">+{{extraRewardIngotFormat}}</span>

                        {{/extraRewardIngot}}

                        {{#goodCommentImg}} 

                        <span class="red">+0.5</span>

                        {{/goodCommentImg}}

                       	 金币

                    </td>

                    <td class="r_type">

                   <!--  {{#sysExpress}}              

                    <a class="v-tag v-tag-blue"><span class="v-tag-tit">{{expressTypeStr}}</span></a>

                    {{/sysExpress}}

                    {{^sysExpress}}              

                    <a class="v-tag v-tag-red"><span class="v-tag-tit">{{expressTypeStr}}</span></a>

                    {{/sysExpress}}
 -->
                    {{#sysRefund}}

                    	<a class="v-tag v-tag-blue"><span class="v-tag-tit">平台返款</span></a>

                    {{/sysRefund}}

                    {{^sysRefund}}

                    	<a class="v-tag v-tag-red"><span class="v-tag-tit">极速返款</span></a>

                    {{/sysRefund}}
 					<!-- 收藏加购 -->
     				{{#collectionType}}

                    	<a class="v-tag v-tag-red"><span class="v-tag-tit">{{collectionTypeStr}}</span></a>

                    {{/collectionType}}
                    <!-- 活动秒拍 -->
					{{#isJHS}}
                       <a class="v-tag v-tag-red"><span class="v-tag-tit">秒拍</span></a>
                     {{/isJHS}}  
 

                    {{#goodCommentImg}} 

                       <a class="v-tag v-tag-red"><span class="v-tag-tit">图评</span></a>

                    {{/goodCommentImg}}

                    </td>

                    #{if role=='admin'}

                    	<td class="r_amount">{{totalNum}}单</td>

                    #{/if}

                    <td class="r_percent"> <strong class="ui-progressbar-mid ui-progressbar-mid-{{receivedRate}}"><em>{{receivedRate}}%</em></strong> 

                    </td>

                    

                    #{if user?.type?.toString()=='BUYER'}

                    <td class="r_op">

                    {{#tags}}
                    
                    

                    <a href="javascript:;"    gender-info='{{genderConfig}}'  buyer-location-info='{{buyerLocationConfig}}'    class="pi-btn pi-btn-primary btnTake" data-id="{{idStr}}">领取任务</a>

                    {{/tags}}

                    {{^tags}}

                    <a href="javascript:;" class="pi-btn" data-id="{{idStr}}" title="{{reason}}">不能领取</a>

                    {{/tags}}

                    </td>

                    #{/if}

                </tr>

            </tbody>

        </table>

        #{if user?.type?.toString()=='BUYER'}

        {{#tags}}

        <div class="taskCover" data-id="{{idStr}}">

            <div class="bg"></div>

            <a href="javascript:;" class="stdColorButton btnTakeIt" data-id="{{idStr}}">领取任务</a>

        </div>

         {{/tags}}

          {{^tags}}

          <div class="taskCover" data-id="{{idStr}}">

            <div class="bg"></div>

            <a class="stdColorButton showReason" data-id="{{idStr}}">{{reason}}</a>

        </div>

         {{/tags}}

        #{/if}

    </div>

    {{/results}}

</textarea>

<textarea id="buyerAccountTempl" class="muban">

    {{#results}}
    <a class="checkTextBtn" href="javascript:;" data-gender="{{gender}}"  data-state="{{state}}" data-id="{{id}}">{{nick}}</a>

    {{/results}}

    {{^results}}

    <a class="checkTextBtn" href="/buyer/account" id="btnBindBuyerAccount">绑定买号</a>

    {{/results}}

</textarea>

#{set 'moreScripts'}

<script src="@{'/public/javascripts/jquery.pagination.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/jquery.pin.min.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/mustache.min.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/jquery.number.min.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/task/list.js'}" type="text/javascript"></script>

#{/set}
